﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Xml;

using Weazel.Willows.Model;

namespace Weazel.Willows.PreliminaryModel
{
	public class system 
		: Module
	{
		public system(Model model, ref List<ModelError> errors, XmlElement xmlElement)
			: base(model)
		{
			read(ref errors, xmlElement);

			IsHardwired = true;
		}

		private void read(ref List<ModelError> errors, XmlElement description)
		{
			System.Diagnostics.Trace.Assert(description.Name == "System");
			System.Diagnostics.Trace.Assert(description.HasAttribute("name"));

			// get the name
			this.Name = description.Attributes["name"].Value;

			// read ONLY structure
			ReadDatapath(ref errors, description);
		}
	}
}
